package com.stella.ieproductivitybackend.controller;

import com.stella.ieproductivitybackend.entity.User;
import com.stella.ieproductivitybackend.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * 登录页控制层
 */
@RestController
@RequestMapping("/login")
public class LoginController {
    @Autowired
    private LoginService loginService;

    @PostMapping("/getUser")
    public Map<String, Object> getUser(@RequestBody User user) {
        return loginService.getUser(user);
    }
}
